//
//  ImageGalleryView.h
//  AutoShowView
//
//  Created by 冷悦 on 16/1/31.
//  Copyright © 2016年 冷悦. All rights reserved.
//

#import <UIKit/UIKit.h>

//定义model的属性delegate
@class  AutoShowView;

@protocol ImageGalleryDelegate <NSObject>

- (void)didTouched:(AutoShowView *)autoShowView;

@end

@protocol ImageGalleryModelDelegate <NSObject>

@property (nonatomic, assign) NSInteger selectId;

@property (nonatomic, strong) NSArray *images;

@property (nonatomic, assign) NSTimeInterval timeInterval;

@property (nonatomic, copy) NSString *introduction;

@end

//使用Objective-C 自动synthsis出相关的属性
@interface ImageGalleryModel : NSObject <ImageGalleryModelDelegate>

@property (nonatomic, assign) NSInteger selectId;

@property (nonatomic, strong) NSArray *images;

@property (nonatomic, assign) NSTimeInterval timeInterval;

@property (nonatomic, copy) NSString *introduction;

@end


//ImageGalleryView, 包括了一个AutoShowView以及一个model
@interface ImageGalleryView : UIView

@property (nonatomic, strong) id<ImageGalleryModelDelegate> model;

@property (nonatomic, weak) id<ImageGalleryDelegate> delegate;

@property (nonatomic, strong) AutoShowView *autoShowView;
/**
 *  更新图片
 */
- (void) updateImageView;

@end
